package island.gotenyama.beans;

import island.gotenyama.enums.InsType;

import java.io.Serializable;

public class UpPlan implements Serializable {

	/**
	 * serialVersionUID 
	 */
	private static final long serialVersionUID = 1L;

	private final InsType insType;
	
	private Integer officePlan;
	
	private Integer teamPlanSum;
	
	public UpPlan(InsType insType, Integer officePlan, Integer teamPlanSum) {
		this.insType = insType;
		this.officePlan = officePlan;
		this.teamPlanSum = teamPlanSum;
	}

	public String getInsType() {
		return insType.toString();
	}

	public Integer getOfficePlan() {
		return officePlan;
	}

	public void setOfficePlan(Integer officePlan) {
		this.officePlan = officePlan;
	}

	public Integer getTeamPlanSum() {
		return teamPlanSum;
	}

	public void setTeamPlanSum(Integer teamPlanSum) {
		this.teamPlanSum = teamPlanSum;
	}

	public Integer getChoseiSum() {
		if (officePlan == null) {
			return null;
		}
		if (teamPlanSum != null) {
			return (officePlan - teamPlanSum);
		}
		return officePlan;
	}
}
